import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set from '@dfeidao/atom-web/local/set';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import s_get from '@dfeidao/atom-web/storage/get';

import render from '@dfeidao/atom-web/render/render';
// import show from '@dfeidao/atom-web/ui/show';
import p001 from './p001';
export default async function a005(fd: IFeidaoAiBrowserComponent, args: string) {
	// 调用事件
	fd.data.node.classList.remove('display-n');
	// fd.data.id = args[0];
	const id = args;
	set(fd, 'id', id);
	// const user = await whoami(get_user_info);
	// console.log(user)
	const prid = await s_get('productid');
	set(fd, 'productid', prid);
	// const user = await whoami(get_user_info);
	// console.log(user)
	// const res = await nodejs<{ length: number; dataArray: object[] }>(url, './permissions/role_type_find6', { id, productid: prid }, false, false);
	const res = await nodejs<{ length: number; dataArray: object[] }>('role-type/zj-000008/s002', { id, productid: prid });
	render(fd, res.dataArray, p001, 'p001', 'inner');
}
